package com.bittech.httpd.handler;

import com.bittech.httpd.common.HttpRequest;
import com.bittech.httpd.common.HttpResponse;
import com.bittech.httpd.common.HttpStatus;
import com.bittech.httpd.core.HandlerAdapter;

/**
 * Author: secondriver
 * Created: 2018/9/5
 */
public class ServerErrorHandler extends HandlerAdapter {
   
    @Override
    public void doGet(HttpRequest request, HttpResponse response) {
        response.setHttpStatus(HttpStatus.INTERNAL_ERROR);
        response.setContentType("text/html; charset=UTF-8");
        response.write("Server Error");
        response.flush();
    }
}
